﻿
CREATE PROCEDURE [dbo].[OPM_ReturnOrderDetail_IsExist]
(
	@ReturnOrderId  int,
	@ProductNumber  nvarchar(50)
)

AS

DECLARE @TempId int

SELECT @TempId=[Id] FROM dbo.[OPM_ReturnOrderDetail] WHERE [ReturnOrderId]=@ReturnOrderId AND [ProductNumber]=@ProductNumber

IF @TempId IS NULL
	RETURN 0
ELSE
	RETURN 1